Properly reconcile and react to changes in cluster operator resource#702
Properly reconcile and react to changes in cluster operator resource#702mfojtik wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mfojtik The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| if err := c.Watch(&source.Kind{Type: &configv1.ClusterOperator{}}, &handler.EnqueueRequestForObject{}); err != nil { | ||
| return nil, err | ||
| } |
There was a problem hiding this comment.
We only care about the ingress clusteroperator, and the reconciler reconciles ingresscontrollers, so this new watch should filter clusteroperators by name and then enqueue an ingresscontroller object (the default ingresscontroller should always exist, so we could use that) rather than the clusteroperator object to so as to maintain a homogeneous workqueue (reconciling the ingresscontroller will ultimately update or recreate the clusteroperator as needed).
We did something similar for the cluster-dns-operator a while back: openshift/cluster-dns-operator#261
|
@mfojtik: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/close |
|
@Miciah: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When an external actor modifies the clusteroperators/ingress resource, it takes 10h[1] for the ingress operator to react and reconcile.
This fix (hopefully) makes the ingress operator reconcile the status when clusteroperator resource change, so it should react to any modification immediately.
[1] https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#example-New